package com.qmyx.supply.admin.controller;

import com.ytjj.qmyx.supplychain.common.api.CommonResult;
import com.ytjj.qmyx.supplychain.service.BankerDataStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p></p>
 *
 *
 * @className BankerOrderController
 * @since 2020/11/30 15:06
 */

@RestController
@RequestMapping("/viewPlate")
public class BankerDataStatisticsController {

    @Autowired
    private BankerDataStatisticsService bankerDataStatisticsService;

//    /**
//     * 首页看板
//     * @param countRequest
//     * @return
//     */
//    @GetMapping("/viewPlateCount")
//    public CommonResult viewPlateCount(@Valid BankerOrderCountRequest countRequest) {
//        DataStatisticsResponse response = this.bankerDataStatisticsService.viewPlateCount(countRequest);
//        return CommonResult.success(response);
//    }
//
//
//    /**
//     * @Description 销售统计
//     *
//     *
//     * 
//     * @Version 1.0
//     **/
//    @GetMapping("/getSaleStatistics")
//    public CommonResult getSaleStatistics(@RequestParam("type") Integer type)  {
//        return CommonResult.success(bankerDataStatisticsService.getSaleStatistics(type));
//    }

    /**
     * @Description 销售量和成交额
     *
     *
     * 
     * @Version 1.0
     **/
    @GetMapping("/getSaleStatisticsList")
    public CommonResult getSaleStatisticsList(@RequestParam("dateType") String dateType)  {
        return CommonResult.success(bankerDataStatisticsService.getSaleStatisticsList(dateType));
    }




}
